﻿#region Copyright ©2008-2010, Technische Universitaet Muenchen
// ====================================================================================================
//
// Last Changed by       $Author: kalus $
// Last Changed Date     $LastChangedDate: 2009-03-18 16:42:33 +0100 (Wed, 18 Mar 2009) $
// Last Changed Revision $Rev: 36 $
//
// ====================================================================================================
#endregion

using System;
using System.Collections.Generic;
using System.Xml;

namespace Tum.CollabXT.VModellXT
{
    public class DecisionGate : ProcessElement, IMilestone
    {
        public DecisionGate() { }
        public DecisionGate(XmlNode node) 
        {
            //From V-Modell
            Id = node.Attributes["id"].Value;
            Name = node.SelectSingleNode("Name").InnerText;
            ExtendedData["TypeName"] = Name;

            XmlNode descNode = node.SelectSingleNode("Sinn_und_Zweck");
            Description = descNode != null ? Helper.GetTextFromHtmlString(descNode.InnerXml) : string.Empty;

            //From VMP config file
            ScheduledDate = DateTime.MinValue;
            ScheduleNumber = -1;
        }

        #region IMilestone Members

        public DateTime ScheduledDate
        {
            get; set;
        }

        public int ScheduleNumber
        {
            get; set;
        }

        #endregion
    }
}
